import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JFrame;
import javax.swing.JPanel;


public class TestDraw extends JPanel {

	public void paint(Graphics g) {
		int radius = 50; //From here...
		Sprite test = new Circle ("A", (int) radius, Color.RED);
		Sprite test2 = new Circle ("B", (int) radius, Color.BLUE);
		Hex one = new Hex();
		Hex two = new Hex();
		Hex three = new Hex();
		one.moveIntoHex(test);
		two.moveIntoHex(test2);
		one.setDrawMatrix(100, 100, radius);
		int temp = (int)(100+radius+radius*Math.cos(Math.PI/3));
		two.setDrawMatrix(temp, (int)(100 + radius*Math.sin(Math.PI/3)), radius); //...to here shouldn't be in the graphics
		temp += (int)(radius+radius*Math.cos(Math.PI/3));
		three.setDrawMatrix(temp,100, radius);
		one.drawHex(g);
		two.drawHex(g);
		three.drawHex(g);
	}

	//Make frame, loop calling repaint (we never call paint) and sleep between frames
	public static void main(String[] args) {
		JFrame frame = new JFrame();
		frame.getContentPane().add(new TestDraw());
		frame.setBackground(Color.gray);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setSize(500, 500);
		frame.setVisible(true);
		frame.repaint();
	}
}
